package cn.stronglink.assetmanage.business.check.presenter;

import java.util.List;

import cn.stronglink.assetmanage.business.check.model.CheckedModel;
import cn.stronglink.assetmanage.business.check.view.checked.CheckedListView;
import cn.stronglink.assetmanage.entity.Asset;
import cn.stronglink.assetmanage.entity.Check;
import cn.stronglink.assetmanage.index.base.BasePresenter;

/**
 * Created by chencongcong on 2018/6/12.
 */

public class CheckedListPresenter extends BasePresenter {
    private CheckedListView checkedListView;
    private CheckedModel checkedModel;
    //未入库表单列表
    private List<Check> entityList;

    public CheckedListPresenter(CheckedListView checkedListView, CheckedModel checkedModel) {
        this.checkedListView = checkedListView;
        this.checkedModel = checkedModel;
    }

    /**
     * 初始化未入库表单列表
     */
    public void initCheckListData() {
        entityList = checkedModel.getDataByOrderNoDistince();
        checkedListView.setListData(entityList);
    }

    @Override
    public void onStart() {

    }

    @Override
    public void onStop() {

    }

    @Override
    public void start() {

    }

    /**
     * 显示选中表单资源列表
     * @param postion
     */
    public void showOrderData(int postion) {
        checkedListView.showAssetListFragment(entityList.get(postion));
    }
}
